<!DOCTYPE html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="第三方框架,图片加载,Glide," />










<meta name="description" content="Glide是一款bumptech发布，并被Google推荐使用的图片加载库。项目地址是https://github.com/bumptech/glide，本文不会对Glide的内存占用和性能进行分析，只是介绍Glide的基本用法。 导入库12compile &amp;apos;com.github.bumptech.glide:glide:3.7.0&amp;apos;compile &amp;apos;com.andr">
<meta name="keywords" content="第三方框架,图片加载,Glide">
<meta property="og:type" content="article">
<meta property="og:title" content="Glide图片加载">
<meta property="og:url" content="http://yoursite.com/2016/10/26/Glide图片加载/index.html">
<meta property="og:site_name" content="SISYPHUSER">
<meta property="og:description" content="Glide是一款bumptech发布，并被Google推荐使用的图片加载库。项目地址是https://github.com/bumptech/glide，本文不会对Glide的内存占用和性能进行分析，只是介绍Glide的基本用法。 导入库12compile &amp;apos;com.github.bumptech.glide:glide:3.7.0&amp;apos;compile &amp;apos;com.andr">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://7xtcmn.com1.z0.glb.clouddn.com/scaltype%281%29.png">
<meta property="og:image" content="http://7xtcmn.com1.z0.glb.clouddn.com/thumb_1.png">
<meta property="og:image" content="http://7xtcmn.com1.z0.glb.clouddn.com/thumb_2.png">
<meta property="og:image" content="http://7xtcmn.com1.z0.glb.clouddn.com/circle.png">
<meta property="og:updated_time" content="2018-03-03T05:16:53.950Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Glide图片加载">
<meta name="twitter:description" content="Glide是一款bumptech发布，并被Google推荐使用的图片加载库。项目地址是https://github.com/bumptech/glide，本文不会对Glide的内存占用和性能进行分析，只是介绍Glide的基本用法。 导入库12compile &amp;apos;com.github.bumptech.glide:glide:3.7.0&amp;apos;compile &amp;apos;com.andr">
<meta name="twitter:image" content="http://7xtcmn.com1.z0.glb.clouddn.com/scaltype%281%29.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2016/10/26/Glide图片加载/"/>





  <title>Glide图片加载 | SISYPHUSER</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">SISYPHUSER</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-word">
          <a href="/word/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-calendar"></i> <br />
            
            word
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2016/10/26/Glide图片加载/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Andy">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="SISYPHUSER">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Glide图片加载</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2016-10-26T15:34:40+08:00">
                2016-10-26
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Android/" itemprop="url" rel="index">
                    <span itemprop="name">Android</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>Glide是一款bumptech发布，并被Google推荐使用的图片加载库。项目地址是<a href="https://github.com/bumptech/glide" target="_blank" rel="noopener">https://github.com/bumptech/glide</a>，本文不会对Glide的内存占用和性能进行分析，只是介绍Glide的基本用法。</p>
<h2 id="导入库"><a href="#导入库" class="headerlink" title="导入库"></a>导入库</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">compile &apos;com.github.bumptech.glide:glide:3.7.0&apos;</span><br><span class="line">compile &apos;com.android.support:support-v4:19.1.0&apos;</span><br></pre></td></tr></table></figure>
<h2 id="基本操作"><a href="#基本操作" class="headerlink" title="基本操作"></a>基本操作</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">Glide.with(context)		//关联activity或fragment的生命周期</span><br><span class="line">	.load(url)			//加载地址(url,资源id，本地图片file)</span><br><span class="line">	.placeholder(id)	//未加载时的占位图</span><br><span class="line">	.error(id)			//加载失败时的占位图</span><br><span class="line">	.into(ImageView);	//加载对象</span><br></pre></td></tr></table></figure>
<a id="more"></a>
<h2 id="基本配置"><a href="#基本配置" class="headerlink" title="基本配置"></a>基本配置</h2><p>Glide的配置是通过实现GlideModule接口来设置。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">public class MyGlideModule implements GlideModule &#123;</span><br><span class="line">    @Override</span><br><span class="line">    public void applyOptions(Context context, GlideBuilder builder) &#123;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    @Override</span><br><span class="line">    public void registerComponents(Context context, Glide glide) &#123;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>然后需要在AndroidManifest.xml中声明</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&lt;meta-data</span><br><span class="line">    android:name=&quot;com.shangbang.store.base.MyGlideModule&quot;</span><br><span class="line">    android:value=&quot;GlideModule&quot; /&gt;</span><br></pre></td></tr></table></figure>
<p>由于Glide是通过反射将GlideModule实例化得，所以需要在混淆文件中加入<br>-keep public class * implements com.bumptech.glide.module.GlideModule</p>
<p>接下来介绍一些Glide的常用配置</p>
<ul>
<li><strong>配置图片本地缓存位置和本地缓存大小</strong></li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">public void applyOptions(final Context context, GlideBuilder builder) &#123;</span><br><span class="line">    builder.setDiskCache(new DiskCache.Factory() &#123;</span><br><span class="line">        @Override</span><br><span class="line">        public DiskCache build() &#123;</span><br><span class="line">         //缓存的文件夹</span><br><span class="line">            File cacheLocation = new File(context.getExternalCacheDir(), &quot;glide&quot;);</span><br><span class="line">            if (!cacheLocation.exists())</span><br><span class="line">                cacheLocation.mkdirs();</span><br><span class="line">            return DiskLruCacheWrapper.get(cacheLocation, 250 * 1024 * 1024);//本地缓存的大小</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<ul>
<li><strong>设置解码格式</strong><br>Glide默认的采用的使RGB_565，如果你对图片的质量要求较高可以采用ARGB_8888格式，缺点是ARGB_8888的内存占用是RGB_565的两倍。此外，ARGB_8888是支持透明格式的，而RGB_565不支持。</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"> public void applyOptions(final Context context, GlideBuilder builder) &#123;</span><br><span class="line">    builder.setDecodeFormat(DecodeFormat.PREFER_ARGB_8888);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="特殊要求的使用"><a href="#特殊要求的使用" class="headerlink" title="特殊要求的使用"></a>特殊要求的使用</h2><ul>
<li><strong>缓存策略</strong></li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"> .diskCacheStrategy(Type)	//设置缓存到本地的策略</span><br><span class="line">DiskCacheStrategy.NONE		//不会缓存到本地</span><br><span class="line">DiskCacheStrategy.SOURCE	//只缓存原图</span><br><span class="line">DiskCacheStrategy.RESULT	//只缓存最终图像（默认）</span><br><span class="line">DiskCacheStrategy.ALL		//缓存所有图像</span><br></pre></td></tr></table></figure>
<ul>
<li><strong>图片格式设置</strong><br>Glide中给了两种图片的放入格式，需要注意的是使用Glide的图片格式时就不要在ImageView中设置scaleType了，否则可能会使Glide的图片格式失效。</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">.centerCrop()		//自适应控件大小</span><br><span class="line">.fitCenter()		//适应图片大小</span><br></pre></td></tr></table></figure>
<p><img src="http://7xtcmn.com1.z0.glb.clouddn.com/scaltype%281%29.png" alt="type"></p>
<ul>
<li><strong>加载优先级</strong></li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">	.priority(TYPE)		//优先级由低到高</span><br><span class="line">Priority.LOW</span><br><span class="line">Priority.NORMAL</span><br><span class="line">Priority.HIGH</span><br><span class="line">Priority.IMMEDIATE</span><br></pre></td></tr></table></figure>
<ul>
<li><strong>缩略图</strong></li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">Glide.with(this)</span><br><span class="line">               .load(&quot;http://my.csdn.net/uploads/201205/06/1336311585_2632.gif&quot;)</span><br><span class="line">               .thumbnail(0.1f)</span><br><span class="line">               .into(iv);</span><br></pre></td></tr></table></figure>
<p>利用thumbnail(0.1f)来设置先加载0.1f的缩略图显示，然后再加载需要的图<br><strong><em>缩略图</em></strong><br><img src="http://7xtcmn.com1.z0.glb.clouddn.com/thumb_1.png" alt=""><br><strong><em>原图</em></strong><br><img src="http://7xtcmn.com1.z0.glb.clouddn.com/thumb_2.png" alt=""></p>
<ul>
<li><strong>自定义图片转化</strong><br>这里以制作圆形头像为例介绍.transform()的使用<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">Glide.with(context)</span><br><span class="line">               .load(url)</span><br><span class="line">               .transform(new CircleTransform(context))</span><br><span class="line">               .into(imageView);</span><br></pre></td></tr></table></figure>
</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br></pre></td><td class="code"><pre><span class="line">public class CircleTransform extends BitmapTransformation &#123;</span><br><span class="line">    public CircleTransform(Context context) &#123;</span><br><span class="line">        super(context);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    @Override</span><br><span class="line">    protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) &#123;</span><br><span class="line">        return circleCrop(pool,toTransform);</span><br><span class="line">    &#125;</span><br><span class="line">    private  Bitmap circleCrop(BitmapPool pool, Bitmap source) &#123;</span><br><span class="line"></span><br><span class="line">        int size = Math.min(source.getWidth(), source.getHeight());</span><br><span class="line"></span><br><span class="line">        int width = (source.getWidth() - size) / 2;</span><br><span class="line">        int height = (source.getHeight() - size) / 2;</span><br><span class="line"></span><br><span class="line">        Bitmap bitmap = pool.get(size, size, Bitmap.Config.ARGB_8888);</span><br><span class="line">        if (bitmap == null) &#123;</span><br><span class="line">            bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        Canvas canvas = new Canvas(bitmap);</span><br><span class="line">        Paint paint = new Paint();</span><br><span class="line">        BitmapShader shader =</span><br><span class="line">                new BitmapShader(source, BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP);</span><br><span class="line">        if (width != 0 || height != 0) &#123;</span><br><span class="line">            // source isn&apos;t square, move viewport to center</span><br><span class="line">            Matrix matrix = new Matrix();</span><br><span class="line">            matrix.setTranslate(-width, -height);</span><br><span class="line">            shader.setLocalMatrix(matrix);</span><br><span class="line">        &#125;</span><br><span class="line">        paint.setShader(shader);</span><br><span class="line">        paint.setAntiAlias(true);</span><br><span class="line"></span><br><span class="line">        float r = size / 2f;</span><br><span class="line">        canvas.drawCircle(r, r, r, paint);</span><br><span class="line"></span><br><span class="line">        return bitmap;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    @Override</span><br><span class="line">    public String getId() &#123;</span><br><span class="line">        return getClass().getName();</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="http://7xtcmn.com1.z0.glb.clouddn.com/circle.png" alt=""></p>
<ul>
<li><strong>回调bitmap</strong></li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">private SimpleTarget target = new SimpleTarget&lt;Bitmap&gt;( 250, 250 ) &#123; //250,250可不加，表示原图大小 </span><br><span class="line">	    @Override</span><br><span class="line">	    public void onResourceReady(Bitmap bitmap, GlideAnimation glideAnimation) &#123;</span><br><span class="line">	        imageView2.setImageBitmap( bitmap );</span><br><span class="line">	    &#125;</span><br><span class="line">	&#125;;</span><br></pre></td></tr></table></figure>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">Glide</span><br><span class="line">	.with( context.getApplicationContext() ) // safer!</span><br><span class="line">	.load( url )</span><br><span class="line">	.asBitmap()</span><br><span class="line">	.into( target );</span><br></pre></td></tr></table></figure>
<p>利用这种方法可以直接获得bitmap，然后可以根据需要对Bitmap进行处理</p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/第三方框架/" rel="tag"># 第三方框架</a>
          
            <a href="/tags/图片加载/" rel="tag"># 图片加载</a>
          
            <a href="/tags/Glide/" rel="tag"># Glide</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2016/09/23/MVP模式/" rel="next" title="MVP模式">
                <i class="fa fa-chevron-left"></i> MVP模式
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/11/24/python爬虫入门/" rel="prev" title="Python爬虫入门">
                Python爬虫入门 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/images/avatar.gif"
                alt="Andy" />
            
              <p class="site-author-name" itemprop="name">Andy</p>
              <p class="site-description motion-element" itemprop="description">Something Wrong</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">18</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">6</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">28</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#导入库"><span class="nav-number">1.</span> <span class="nav-text">导入库</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#基本操作"><span class="nav-number">2.</span> <span class="nav-text">基本操作</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#基本配置"><span class="nav-number">3.</span> <span class="nav-text">基本配置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#特殊要求的使用"><span class="nav-number">4.</span> <span class="nav-text">特殊要求的使用</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Andy</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Mist</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
